Skip to content

Fix little-endian serialization in compute_challenge()#168

Merged
jtraglia merged 4 commits into
ethereum:mainfrom
asn-d6:little_endian_challenge
Mar 2, 2023
Merged

Fix little-endian serialization in compute_challenge()#168
jtraglia merged 4 commits into
ethereum:mainfrom
asn-d6:little_endian_challenge

Conversation

@asn-d6

@asn-d6 asn-d6 commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

That code was supposed to be doing:

    degree_poly = int.to_bytes(FIELD_ELEMENTS_PER_BLOB, 16, 'little')
    data = FIAT_SHAMIR_PROTOCOL_DOMAIN + degree_poly

but it was not doing the endianness right.

It was supposed to do:

    degree_poly = int.to_bytes(FIELD_ELEMENTS_PER_BLOB, 16, 'little')
    data = FIAT_SHAMIR_PROTOCOL_DOMAIN + degree_poly
Comment thread src/c_kzg_4844.c Outdated
asn-d6 and others added 2 commits March 2, 2023 17:46
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
@asn-d6 asn-d6 force-pushed the little_endian_challenge branch 2 times, most recently from 942af78 to 3074b5c Compare March 2, 2023 16:13
@asn-d6 asn-d6 force-pushed the little_endian_challenge branch from 3074b5c to ed36a07 Compare March 2, 2023 16:17
@jtraglia jtraglia merged commit 53b38fa into ethereum:main Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants